using System;

namespace KNCApp.DataSource.DB
{
    class SQLCommands
    {
        public static string INSERT_PILOT =
            "INSERT INTO PILOCI(ID_PILOTA, NAZWISKO, IMIE, DATA_URODZENIA) " +
            "VALUES(?, ?, ?, ?)";
        public static string INSERT_TEST =
            "INSERT INTO BADANIA(ID_BADANIA, DATA_BADANIA, OPIS) " +
            "VALUES(?, ?, ?)";
        public static string INSERT_PILOT_TEST =
            "INSERT INTO BADANIA_PILOTA(ID_BAD_PILOTA, ID_PILOTA, ID_BADANIA, STANOWISKO) " +
            "VALUES(?, ?, ?, ?)";
        public static string INSERT_RESULT =
            "INSERT INTO WYNIKI(ID_WYNIKU, ID_BAD_PILOTA, ETCO2, ODDECH, SPO2, TETNO, CISNIENIE, CZAS, STAN, TLEN) " +
            "VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
        public static string SELECT_PILOTS =
            "SELECT ID_PILOTA, NAZWISKO, IMIE, DATA_URODZENIA FROM PILOCI ";
        public static string SELECT_TESTS =
            "SELECT ID_BAD_PILOTA, BADANIA_PILOTA.ID_BADANIA AS ID_BADANIA, " +
            "DATA_BADANIA, OPIS, BADANIA_PILOTA.ID_PILOTA AS ID_PILOTA, NAZWISKO, IMIE, DATA_URODZENIA, STANOWISKO " +
            "FROM BADANIA_PILOTA, BADANIA, PILOCI "+
            "WHERE BADANIA_PILOTA.ID_PILOTA = PILOCI.ID_PILOTA AND " +
            "BADANIA_PILOTA.ID_BADANIA = BADANIA.ID_BADANIA ";
        public static string SELECT_RESULTS =
            "SELECT ID_WYNIKU, ETCO2, ODDECH, SPO2, TETNO, CISNIENIE, CZAS, STAN, TLEN " +
            "FROM WYNIKI WHERE ID_BAD_PILOTA = ? ";
    }
}
